<HTML><HEAD><TITLE>library(queues)</TITLE></HEAD><BODY>
[ <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]<H1>library(queues)</H1>
define queue operations
<H2>Predicates</H2>
<BLOCKQUOTE>
<DL>
<DT><A HREF="empty_queue-1.html"><STRONG>empty_queue(Queue)</STRONG></A></DT>
<DD>tests whether the queue is empty</DD>
<DT><A HREF="head_queue-2.html"><STRONG>head_queue(Queue, Head)</STRONG></A></DT>
<DD>unifies Head with the first element of the queue</DD>
<DT><A HREF="join_queue-3.html"><STRONG>join_queue(Element, OldQueue, NewQueue)</STRONG></A></DT>
<DD>adds the new element at the end of the queue</DD>
<DT><A HREF="jump_queue-3.html"><STRONG>jump_queue(Element, OldQueue, NewQueue)</STRONG></A></DT>
<DD>adds the new element at the front of the list</DD>
<DT><A HREF="length_queue-2.html"><STRONG>length_queue(Queue, Length)</STRONG></A></DT>
<DD>counts the number of elements currently in the queue</DD>
<DT><A HREF="list_join_queue-3.html"><STRONG>list_join_queue(List, OldQueue, NewQueue)</STRONG></A></DT>
<DD>adds the new elements at the end of the queue</DD>
<DT><A HREF="list_jump_queue-3.html"><STRONG>list_jump_queue(List, OldQueue, NewQueue)</STRONG></A></DT>
<DD>adds all the elements of List at the front of the queue</DD>
<DT><A HREF="list_to_queue-2.html"><STRONG>list_to_queue(List, Queue)</STRONG></A></DT>
<DD>creates a new queue with the same elements as List</DD>
<DT><A HREF="make_queue-1.html"><STRONG>make_queue(Queue)</STRONG></A></DT>
<DD>creates a new empty queue</DD>
<DT><A HREF="queue_to_list-2.html"><STRONG>queue_to_list(Queue, List)</STRONG></A></DT>
<DD>creates a new list with the same elements as Queue</DD>
<DT><A HREF="serve_queue-3.html"><STRONG>serve_queue(OldQueue, Head, NewQueue)</STRONG></A></DT>
<DD>removes the first element of the queue for service</DD>
</DL>
</BLOCKQUOTE>
<H2>Description</H2>
<P>
    In this package, a queue is represented as a term Front-Back,  where
    Front  is  a list and Back is a tail of that list, and is normally a
    variable.  join_queue will only work when the Back  is  a  variable,
    the  other routines will accept any tail.  The elements of the queue
    are the list difference, that is, all the elements starting at Front
    and stopping at Back.  Examples:
<PRE>
	[a,b,c,d,e|Z]-Z	    has elements a,b,c,d,e
	[a,b,c,d,e]-[d,e]   has elements a,b,c
	Z-Z		    has no elements
	[1,2,3]-[1,2,3]	    has no elements
</PRE>

<H2>About</H2><UL COMPACT>
<LI><STRONG>Author: </STRONG>R.A.O'Keefe
<LI><STRONG>Copyright &copy; </STRONG>This file is in the public domain
<LI><STRONG>Date: </STRONG>Friday November 18th, 1983, 8:09:31 pm
</UL>
<HR>Generated from queues.eci on 2009-05-27 01:25
</BODY></HTML>
